package org.chen.common.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("fy_user")
@Schema(name = "User对象", description="用户表")
public class User extends Model<User> implements Serializable {

    private static final long serialVersionUID=1L;

    @Schema(description = "用户id")
    @TableId(value = "uid", type = IdType.AUTO)
    private Integer uid;

    @Schema(description = "用户账号")
    private String account;

    @Schema(description = "用户密码")
    @JsonIgnore
    private String pwd;

    @Schema(description = "用户的邮箱")
    private String email;

    @Schema(description = "用户备注")
    private String mark;

    @Schema(description = "手机号码")
    private String phone;

    @Schema(description = "1为正常，0为禁止")
    private Boolean status;

    @Schema(description = "用户登陆类型，h5,pc")
    private String loginType;

    @Schema(description = "更新时间")
    private Date updateTime;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "最后一次登录时间")
    private Date lastLoginTime;
}
